<template>
    <h1>Parent Event Model</h1>
    <p>搜索内容为：{{ searchText }}</p>
    <ChildEventModel @search="getSearchText" />
</template>

<script>
import ChildEventModel from "./ChildEventModel.vue";
export default{
    data(){
        return{
            searchText:""
        }
    },
    components:{
        ChildEventModel
    },
    methods:{
        getSearchText(data){
            this.searchText = data;
        }
    }
}
</script>